<?php
    if(isset($_SESSION['ADMIN']['USER'])){
	session_destroy();
    }
?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="th" lang="th" xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>เข้าสู่ระบบ</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta http-equiv="Content-Style-Type" content="text/css" />
        <meta name="distribution" content="Thailand" />
        <meta http-equiv="content-language" content="th" />
        <meta name="copyright" content="&copy; 2010 นวัตพล ยศกำธร, http://www.nawattapon.com" />
        <meta name="author" content="นวัตพล ยศกำธร" />
        
        <link type="text/css" href="<?php echo SITEADMIN; ?>/css/reset.css" rel="stylesheet" />
        <link type="text/css" href="<?php echo SITEADMIN; ?>/css/text.css" rel="stylesheet" />
        <link type="text/css" href="<?php echo SITEADMIN; ?>/css/960_24_col.css" rel="stylesheet" />

        <link type="text/css" href="<?php echo SITEADMIN; ?>/css/global.css" rel="stylesheet" />
        <link type="text/css" href="<?php echo SITEADMIN; ?>/css/login.css" rel="stylesheet" />
	
        <link type="text/css" href="<?php echo SITEADMIN; ?>/css/jquryui_flick/style.css" rel="stylesheet" />
        <script type="text/javascript" src="<?php echo SITEADMIN; ?>/js/jquery-1.5.1.min.js"></script>
        <script type="text/javascript" src="<?php echo SITEADMIN; ?>/js/jquery-ui-1.8.11.custom.min.js"></script>
        <script type="text/javascript" src="<?php echo SITEADMIN; ?>/js/js.func.js"></script>
         <!--[if IE 6]>
            <link href="<?php echo SITEADMIN; ?>/css/ie6.css" rel="stylesheet" />
        <![endif]-->
        <!--[if IE 7]>
            <link href="<?php echo SITEADMIN; ?>/css/ie7.css" rel="stylesheet" />
        <![endif]-->
        <!--[if IE 8]>
            <link href="<?php echo SITEADMIN; ?>/css/ie8.css" rel="stylesheet" />
        <![endif]-->
	
        <script>
            $(document).ready(function(){
		$( "#tabs" ).tabs();
		
		$('.loginBt').click(function(){
		   if(trim($('#username').val())=='')
		    {
			alert('กรุณากรอก username');
		    }
		    else if(trim($('#password').val())=='')
		    {
			alert('กรุณากรอก password');
		    }
		    else
		    {
			$('#loginFrm').submit();
		    }
		});
	    });
	</script>
    </head>
    <body>
        <div class="container_24">
            <div class="grid_24" id="wrapLogin">
		<div id="tabs">
                    <ul>
                            <li><a href="#tabs-1">เข้าสู่ระบบ</a></li>
                            <!--<li><a href="#tabs-2">ลืมรหัสผ่าน?</a></li>-->
                    </ul>
                    <div id="tabs-1">
                        <form id="loginFrm" method="post" action="?m=system&s=login_query">
                            <p>
                                <label>ชื่อผู้ใช้ :</label>
                                <input name="username" type="text" class="input large" id="username" />
                            </p>
                            <p>
                                <label>รหัสผ่าน :</label>
                                <input name="password" type="password" class="input large" id="password" />
                            </p>
			</form>
                            <p class="pInputButton">
                                <button class="button loginBt">เข้าสู่ระบบ</button>
                                <img src="<?php echo SITEADMIN; ?>/images/ajax-loader.gif" class="displayNone ajax_loader ajax_msg" />
                            </p>
			<div class="fail canhide png_bg ajax_msg" id="error_msg"></div>
			<div class="success canhide ajax_msg" id="success_msg"></div>
                    </div>
		    
<!--                    <div id="tabs-2">-->
<!--                        <form>-->
<!--                            <p>-->
<!--                                <label>กรุณากรอกชื่อผู้ใช้หรืออีเมล์ :</label>-->
<!--                                <input name="username" type="text" class="input large" id="username" />-->
<!--                            </p>-->
<!--                        </form>-->
<!--                            <p class="pInputButton">-->
<!--                                 <button class="button forgetPassBt">Submit</button>-->
<!--				<img src="<?php echo SITEADMIN; ?>/images/ajax-loader.gif" class="displayNone ajax_loader hiddenEle" />-->
<!--                            </p>-->
<!--                    </div>-->
		    <iframe class="hiddenEle" name="ifrm"></iframe>
                </div>
                <div class="coppyRight">
                    <!--Admin Control Panel by <a href="http://www.devlism.com" title="Freelance Web Developer">DevLism~</a>
		    <br />-->
		    Test with ie7 , ie8 , firefox 3.6.12 , chrome 7.0
                </div>
            </div>
            <!-- end .grid_24 -->
            <div class="clear"></div>
        </div>
    </body>
</html>